﻿using J.FoodRepository;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace J.FoodManageGet.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class MySQLController : ControllerBase
    {
        private readonly SqlSugarDbcontext db;

        public  MySQLController(SqlSugarDbcontext db)
        {
            this.db = db;
        }
        /// <summary>
        /// MySql迁移
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public string CreateData()
        {
            db.FoodDataBase();
            return "ok";
        }

    }
}
